/*
* @(#)DmsContentStoreHandler.java
*
* Copyright (c) 2003 DCIVision Ltd
* All rights reserved.
*
* This software is the confidential and proprietary information of DCIVision
* Ltd ("Confidential Information").  You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the license
* agreement you entered into with DCIVision Ltd.
*/
package com.dcivision.dms.core;

import java.io.InputStream;

/**
 * <p>Class Name:       DmsContentStoreHandler.java    </p>
 * <p>Description:      The interface consists of the default functions of a content store should have.</p>
 * @author              Zoe Shum
 * @company             DCIVision Limited
 * @creation date       01/08/2003
 * @version             $Revision: 1.5 $
 */
public interface DmsContentStoreHandler {

    /** indicate this is file name property */
    public static final String FILE_NAME_PROPERTY = "DMS.FILE_NAME";

    /** indicate this is file name property */
    public static final String FILE_PHYSICAL_PATH = "DMS.FILE_PHYSICAL_PATH";
    public static final String FILE_CONTENT_PATH ="dms.file_content_path";

    /** indicate this is a file content */
    public static final String FILE_CONTENT_PROPERTY = "DMS.FILE_CONTENT";

    /** indicate this is a file size property */
    public static final String FILE_SIZE_PROPERTY = "DMS.FILE_SIZE";

    /** indicate this is a file extension property */
    public static final String FILE_EXTENSION_PROPERTY = "DMS.FILE_EXTENSION";

    /** indicate this is a store dms folder name property */
    public static final String STORE_DMS_FOLDER_NAME_PROPERTY = "DMS.STORE_DMS_FOLDER_NAME_PROPERTY";
    
    /** indicate this is a store dms folder segment number property */
    public static final String SEGMENTNUM_PROPERTY = "DMS.STORE_DMS_FOLDER_SEGMENTNUM_PROPERTY";    

    /** indicate this is a  new file name ,usa at rename operate */
    public static final String NEW_FILE_NAME = "DMS.NEW_FILE_NAME";    
    
    
    public void setProperties(DocumentProperties properties);
    public DocumentProperties getProperties();
    public void setProperty(String propertyName, Object propertyValue);
    public String getContentType();
    public String getExtension();
    public Object getProperty(String propertyName);
    
    public byte[] read() throws ContentStoreException;
    public InputStream readStream() throws ContentStoreException;
    public void write() throws ContentStoreException;
    public void delete() throws ContentStoreException;    
    public void rename() throws ContentStoreException;
    public void close() throws ContentStoreException;
}
